package com.tepth.shadow.ui.progress.sweetalert;

import android.app.Dialog;
import android.content.Context;

/**
 * @author zhangyu
 * @date 2018/3/8
 */

public class DialogLoader implements IDialog {

    private IDialog mDialog;

    public DialogLoader(Context context) {
        mDialog = new SweetDialog(context);
    }

    @Override
    public void showProgressDialog(boolean canCancel,String title, String msg) {
        mDialog.showProgressDialog(canCancel,title, msg);
    }

    @Override
    public void changeText(String title,String msg) {
        mDialog.changeText(title,msg);
    }

    @Override
    public void showSuccess(String title,String msg, IDialogClickListener clickListener) {
        mDialog.showSuccess(title,msg, clickListener);
    }

    @Override
    public void showFailed(String title,String msg, IDialogClickListener clickListener) {
        mDialog.showFailed(title,msg, clickListener);
    }

    @Override
    public void showWarning(String title, String msg, IDialogClickListener clickListener) {
        mDialog.showWarning(title,msg,clickListener);
    }

    @Override
    public void clearDialog() {
        mDialog.clearDialog();
    }

    @Override
    public Dialog getDialog() {
        return mDialog.getDialog();
    }
}
